<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 'use strict'

        // function fn(name, ...rest) {
        //     // console.log(name, age);
        //     // console.log(rest);
        // }

        // fn('张三', 16, "男")
        // 在使用了严格模式的作用域内直接声明变量是不允许的
        // var a = "张三"
        // console.log(window);
        // delete a
        // console.log(window);
        // let obj = {
        //     name: '张三',
        //     age: 15
        // }
        // delete obj.age
        // console.log(obj);
        // name属性可以用来获取函数的名字
        // function fn() {

        // }

        // console.log(fn.name);

        // function fn() {
        //     console.log(this);
        // }
        // window.fn()
        // let obj = {
        //     name: '张三',
        //     info: {
        //         fn,
        //         age: 16
        //     }
        // }
        // obj.info.fn()
        // window.setTimeout(function() {
        //     console.log(this)
        // }, 1000);
        // 箭头函数的this永远指向箭头函数声明时所在的对象
        // let obj = {
        //     info: {
        //         name: '张三',
        //         fn() {
        //             // console.log(this);
        //             setTimeout(() => {
        //                 console.log(this);
        //                 // obj.name = '李四'
        //                 // console.log(this);
        //             }, 1000)
        //         }
        //     }
        // }

        // obj.info.fn()
        // console.log(obj);
        // window.setTimeout(function() {
        //     console.log(this);
        // }, 10)
        // let obj = {
        //     info: {
        //         name: '张三',
        //         fn() {
        //             // console.log(this);
        //             // var _this = this
        //             window.setTimeout(() => {
        //                 console.log(this);
        //                 // _this.name = '李四'
        //                 // console.log(obj);
        //             }, 1000)
        //         }
        //     }
        // }
        // obj.info.fn()
        let list = [{
            "uid": 1539789,
            "mobile": "18761800011",
            "avatar": "https:\/\/baijiayun-wangxiao.oss-cn-beijing.aliyuncs.com\/uploads\/avatar.jpg",
            "nickname": "121z",
            "status": 1,
            "created_at": "1592223461",
            "updated_at": "1592224051"
        }, {
            "uid": 1539786,
            "mobile": "18761800012",
            "avatar": "https:\/\/baijiayun-wangxiao.oss-cn-beijing.aliyuncs.com\/uploads\/avatar.jpg",
            "nickname": "121",
            "status": 1,
            "created_at": "1592223031",
            "updated_at": "1592224058"
        }, {
            "uid": 1539785,
            "mobile": "16598745622",
            "avatar": "https:\/\/baijiayun-wangxiao.oss-cn-beijing.aliyuncs.com\/uploads\/avatar.jpg",
            "nickname": "\u5565\u4e8b",
            "status": 1,
            "created_at": "1592222732",
            "updated_at": "1592224082"
        }, {
            "uid": 1539784,
            "mobile": "18761800000",
            "avatar": "https:\/\/baijiayun-wangxiao.oss-cn-beijing.aliyuncs.com\/uploads\/avatar.jpg",
            "nickname": "\u5f20\u4e09\u75af",
            "status": 1,
            "created_at": "1592222732",
            "updated_at": "0"
        }, {
            "uid": 1539768,
            "mobile": "18435790000",
            "avatar": "http:\/\/120.53.31.103:84\/uploads\/image\/2020-06-15\/FbVbPSmw9yKm5rhn8OUx3Av2HLlFuUFCzNWZD3WB.png",
            "nickname": "pipi",
            "status": 1,
            "created_at": "1592215722",
            "updated_at": "1592223738"
        }, {
            "uid": 1539767,
            "mobile": "13233333333",
            "avatar": "http:\/\/120.53.31.103:84\/uploads\/avatar.jpg",
            "nickname": "123",
            "status": 0,
            "created_at": "1592215623",
            "updated_at": "1592223746"
        }, {
            "uid": 1539766,
            "mobile": "12345678901",
            "avatar": "http:\/\/120.53.31.103:84\/uploads\/avatar.jpg",
            "nickname": "123323",
            "status": 1,
            "created_at": "1592215568",
            "updated_at": "1592219482"
        }, {
            "uid": 1539765,
            "mobile": "11781781231",
            "avatar": "http:\/\/120.53.31.103:84\/uploads\/avatar.jpg",
            "nickname": "hia",
            "status": 0,
            "created_at": "1592215567",
            "updated_at": "1592223751"
        }, {
            "uid": 1539764,
            "mobile": "13698545698",
            "avatar": "http:\/\/120.53.31.103:84\/uploads\/image\/2020-06-15\/jDRI8OIeqtcKcwtx37re4NC2or4ARGNXcticUiq6.png",
            "nickname": "212",
            "status": 1,
            "created_at": "1592215546",
            "updated_at": "1592217842"
        }, {
            "uid": 1539763,
            "mobile": "13526978456",
            "avatar": "http:\/\/120.53.31.103:84\/uploads\/image\/2020-06-15\/XdQsU85SZCnakZBaJn0TjC5DFS87dPzFUj3JohL2.png",
            "nickname": "1212",
            "status": 1,
            "created_at": "1592215422",
            "updated_at": "1592215422"
        }, {
            "uid": 1539754,
            "mobile": "15697856212",
            "avatar": "http:\/\/120.53.31.103:84\/uploads\/image\/2020-06-15\/EuMTfekVXYCkFp1gIwsvgMYX3Uj9sZsnwwRZNnOj.png",
            "nickname": "121333",
            "status": 0,
            "created_at": "1592212853",
            "updated_at": "1592213495"
        }, {
            "uid": 1539753,
            "mobile": "18888888888",
            "avatar": "http:\/\/120.53.31.103:84\/uploads\/image\/2020-06-15\/PbaW7AwkOQV8OQrGR6Wa6lkv8vbdPxaJ3BGOSQ5I.jpeg",
            "nickname": "ZhuZhuXia",
            "status": 0,
            "created_at": "1592212196",
            "updated_at": "1592215708"
        }, {
            "uid": 1539751,
            "mobile": "16455895622",
            "avatar": "http:\/\/120.53.31.103:84\/uploads\/image\/2020-06-15\/BcAZREdBiudJa5yP3qBf4fb7qA9LAcCk0AmvGgWn.png",
            "nickname": "sgdhs",
            "status": 0,
            "created_at": "1592211471",
            "updated_at": "1592211856"
        }, {
            "uid": 1539749,
            "mobile": "16854695765",
            "avatar": "http:\/\/120.53.31.103:84\/uploads\/avatar.jpg",
            "nickname": "qwqw",
            "status": 1,
            "created_at": "1592211134",
            "updated_at": "1592211134"
        }, {
            "uid": 1539747,
            "mobile": "13556544589",
            "avatar": "http:\/\/120.53.31.103:84\/uploads\/avatar.jpg",
            "nickname": "dhs",
            "status": 1,
            "created_at": "1592210639",
            "updated_at": "1592210639"
        }, {
            "uid": 1539745,
            "mobile": "13592659843",
            "avatar": "http:\/\/120.53.31.103:84\/uploads\/image\/2020-06-15\/SYFiU4ynHjnph2mO70TU47LiDs5l8rRqHmZBG292.png",
            "nickname": "\u5b59\u6684\u660e",
            "status": 1,
            "created_at": "1592203037",
            "updated_at": "1592209832"
        }, {
            "uid": 1539744,
            "mobile": "18555555555",
            "avatar": "http:\/\/120.53.31.103:84\/uploads\/image\/2020-06-15\/qPLUfwlDqSExyFcZmP3cnQQKW8xMUN0kcND10n5n.png",
            "nickname": "???",
            "status": 0,
            "created_at": "1592201979",
            "updated_at": "1592207529"
        }, {
            "uid": 1539743,
            "mobile": "13786456732",
            "avatar": "http:\/\/120.53.31.103:84\/uploads\/image\/2020-06-15\/Llt2dKz9hIhoTPtfSY863QEvk3dYnll4UlfOxSFc.png",
            "nickname": "\u6f02\u4eae\u56fd",
            "status": 0,
            "created_at": "1592201929",
            "updated_at": "1592204762"
        }, {
            "uid": 1539742,
            "mobile": "16532488596",
            "avatar": "http:\/\/120.53.31.103:84\/uploads\/image\/2020-06-15\/YHsyO4j0a8bXtfVWD5DsgeeXcUlKfTeNULzD0X2F.png",
            "nickname": "lop",
            "status": 0,
            "created_at": "1592200528",
            "updated_at": "1592223701"
        }]

        function subList(pagenum = 1, pagesize = 10) {
            return list.splice(pagenum - 1, pagesize)
        }

        // let pageList = subList()
        // console.log(pageList);
        // 20~39
        let pageList = subList(1, 20)
        console.log(pageList);
    </script>
</body>

</html>